	<?php global $cv_option, $cv_comments_switcher, $hentry_count;
	
	$show_comments = false;	
	if($cv_comments_switcher == 'off')
		$show_comments = false;
	else if($cv_option['show_comments'] == 'Posts/Pages') 
		$show_comments = true;
	elseif(is_page() && $cv_option['show_comments'] == 'Pages Only')
		$show_comments = true;
	elseif(!is_page() && $cv_option['show_comments'] == 'Posts Only')
		$show_comments = true;
		
	?>	
	
    <div class="hentry clearfix <?php if($hentry_count==1) {echo 'first';}?>">			
		
			<div class="entry-meta clearfix">
				
					<div class="left-info">
						<?php if(is_single()) {
								
									//Get all terms associated with post in taxonomy 'category'
									$terms = get_the_terms(get_the_ID(),'category');
									
									//Get an array of their IDs
									$term_ids = wp_list_pluck($terms,'term_id');

									//Get array of parents - 0 is not a parent
									$parents = array_filter(wp_list_pluck($terms,'parent'));

									//Get array of IDs of terms which are not parents.
									$term_ids_not_parents = array_diff($term_ids,  $parents);

									//Get corresponding term objects
									$terms_not_parents = array_intersect_key($terms,  $term_ids_not_parents);
									//echo $terms_not_parents; 
									echo '<span class="category">';
									foreach($terms_not_parents as $t) {										
									?>
										<a href="<?php echo get_term_link($t->slug, 'category');?>"><?php echo $t->name;?></a>
									<?php }
									echo '</span>';
						} ?>		
						<span class="comments-link">
							<?php if($show_comments == true) { 
								if(cv_is_installed() && cv_can_replace()) { ?>
									<a href="<?php echo get_permalink() . '#disqus_thread';?>"></a>	
								<?php }
								else { ?>								
									<a href="<?php echo get_comments_link();?>" ><?php echo get_comments_number();?></a>
								<?php } 
							}
							else { ?>	
								<a href="<?php echo get_permalink();?>" > </a>
							<?php } ?>
						</span>	
						
						<?php if($cv_option['sm_show_socialmedia'] == true) echo cv_wpsocialite_markup('small'); ?>
					</div>				
					
					<?php if(!is_page()) { ?>
						<span>						
							<?php echo apply_atomic_shortcode( 'entry_meta', __( '[entry-author]', hybrid_get_textdomain() ) ); ?>
						</span>
						
						<span class="date">
							<?php echo get_the_time('M jS, Y');?> 					
						</span>	
					<?php } ?>
			
			</div>	<!-- .entry-meta -->
		
			<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>		
			
			<?php if(!is_page() && !is_single() && $cv_option['homepage_post_featuredimage'] != 'not-show') { ?>
				<?php if ( has_post_thumbnail() && current_theme_supports( 'get-the-image' ) ) { 
					$thumb = get_the_image( array( 'format' => 'array', 'echo' => false, 'custom_key' => array( 'Thumbnail', 'thumbnail' ), 'default_size' => 'medium') );  
					if ( !empty( $thumb['src'] ) ) { ?>
						<div class="entry-img">					
							<a href="<?php echo the_permalink(); ?>"></a><strong></strong><img src="<?php echo $thumb['src']; ?>">						
						</div><!-- .entry-img -->
					<?php } 
				}	
			} ?>
		
		<div class="entry-content">
			
			<?php 
			if(!is_page() && !is_single()) {
				if($cv_option['homepage_post_content'] == 'excerpt') {
					the_excerpt(); ?>
					<a class="more-link" href="<?php echo the_permalink(); ?>">&rarr;Read More</a>
				<?php }
				else {
					global $more; $more = 0;
					the_content('');
					
					// Check the content for the more text
					$ismore = @strpos( $post->post_content, '<!--more-->');
					// If there's a match
					if($ismore) { ?> <a class="more-link" href="<?php echo the_permalink(); ?>">&rarr;Read More</a> <?php }
				
				}
					
			}
			else {
				the_content();
				wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) );		
			}
			?>			
			
		</div><!-- .entry-content -->

		<?php if(is_single()) {
			echo apply_atomic_shortcode( 'entry_meta', __( '[entry-terms before="Tags: "]', hybrid_get_textdomain() ) );
		} ?>	
		
		
	</div><!-- .hentry -->				

	<?php
		if($show_comments == true)
			comments_template( '/comments.php', true ); // Loads the comments.php template.
	?> 
	
	<?php $cv_comments_switcher = 'on'; ?> 
